package com.qfedu.service.impl;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.qfedu.dao.WeekDao;
import com.qfedu.entity.Week;
import com.qfedu.service.WeekService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class WeekServiceImpl implements WeekService {

    @Autowired
    private WeekDao weekDao;

    @Override
    public List<Week> queryWeek() {

        List<Week> weeks = weekDao.queryWeek();

        return weeks;
    }

    public int insertWeek(Week week){
        return weekDao.insertWeek(week);
    }

    @Override
    public int deleteById(int id) {
        return weekDao.deleteById(id);
    }

    @Override
    public Week queryWeekById(int id) {
        return weekDao.queryWeekById(id);
    }

    @Override
    public int update(Week week) {
        return weekDao.update(week);
    }

}
